package com.avic.szzx.exception;


public enum EmBusinessError implements CommonError {

    //10001通用错误类型
    PARAMETER_VALIDATION_ERROR(10001,"参数不合法"),
    //10002未知错误
    UNKNOW_ERROR(10002,"未知错误"),
    //20000开头为用户信息相关错误定义 
    DB_INSERT_FAILED(20001,"关系型数据库插入失败！"),
    KAFKA_ERROR(30002,"Kafka消息队列发送异常，关系数据库回滚！"),
    ;
	
	private int errCode;
	
	private String errMsg;
  
	private EmBusinessError(int errCode,String errMsg){
        this.errCode = errCode;
        this.errMsg = errMsg;
    }


    @Override
    public int getErrCode() {
        return this.errCode;
    }

    @Override
    public String getErrMsg() {
        return this.errMsg;
    }

    @Override
    public CommonError setErrMsg(String errMsg) {
        this.errMsg = errMsg;
        return this;
    }
}
